package cc.lj.internal.api.merchant.api;

import cc.lj.internal.api.core.config.FeignConfiguration;
import cc.lj.internal.api.merchant.api.fallback.PropertyResourcesFeignFallBackService;
import cc.lj.internal.api.merchant.api.fallbackfactory.PropertyResourcesFeignServiceFallbackFactory;
import cc.lj.internal.api.merchant.dto.PropertyResourcesApiDTO;
import cc.lj.internal.core.exception.SysExceptionEnum;
import cc.lj.internal.core.http.HttpResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * 物业信息展位表Feign服务
 * @author liangxifeng
 * @date 2021-12-29
 */
@FeignClient(contextId = "f-lj-internal-merchant-propertyResourcesFeignService",
        name = "lj-internal-merchant",
        path = "propertyResources",
        url = "${feign.merchantUrl}",
        //fallback = PropertyResourcesFeignFallBackService.class,
        fallbackFactory = PropertyResourcesFeignServiceFallbackFactory.class,
        configuration = {FeignConfiguration.class})
public interface PropertyResourcesFeignService {
    /**
     *某个区域下的在租展位以及该展位的日租金接口List
     * @param relationId 物业资源分表property_relation主键
     * @return 在租展位以及该展位的日租金List
     */
    @PostMapping("/getRentingResourceListByArea")
    HttpResult<List<PropertyResourcesApiDTO>> getRentingResourceListByArea(@RequestParam Integer relationId);

}
